package xyz.molzhao.controller;

import xyz.molzhao.domain.User;
import xyz.molzhao.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private IUserService userService;

    @RequestMapping("/add")
    public void addUser(@RequestBody User user) {
        userService.save(user);
    }
}
